package com.derbysoft.defender.api;

import java.util.Map;

/**
 * <p>some description here.</p>
 * Created by Afee Lee on 2017-03-20 22:24
 *
 * @author Afee Lee
 * @version 1.0
 * @see Object
 * @since 1.8
 */
public class ApiRequestException extends RuntimeException {
    private int statusCode;

    private Map<String, String> httpHeaders;

    public ApiRequestException(String message) {
        super(message);
    }

    public ApiRequestException(String message, Throwable cause) {
        super(message, cause);
    }

    public int getStatusCode() {
        return statusCode;
    }

    public Map<String, String> getHttpHeaders() {
        return httpHeaders;
    }

    public ApiRequestException statusCode(int statusCode) {
        this.statusCode = statusCode;
        return this;
    }

    public ApiRequestException httpHeaders(Map<String, String> httpHeaders) {
        this.httpHeaders = httpHeaders;
        return this;
    }
}
